﻿using System.Collections.ObjectModel;

namespace ServerCrafter.ClassLibrary.ViewModels
{
    public sealed class InstalledPlugin
    {
        public string Name { get; set; }
    }

    public sealed class VMInstalledPlugins
    {
        private ObservableCollection<InstalledPlugin> InstalledPlugins { get; set; }

        public ObservableCollection<InstalledPlugin> Get()
        {
            InstalledPlugins = new ObservableCollection<InstalledPlugin>();

            for (var i = 0; i < PluginManager.InstalledPlugins.Count; i++)
            {
                var installedPlugin = new InstalledPlugin { Name = PluginManager.InstalledPlugins.List[i] };
                InstalledPlugins.Add(installedPlugin);
            }
            return InstalledPlugins;
        }
    }
}